package java8;

/**
 * Created by zhaowentong on 2017/6/16.
 */
public class NutritionFacts {

    private final String name;

    public static class Builder{
        private final int age;
        private final String name;

        public Builder(int age, String name) {
            this.age = age;
            this.name = name;
        };
        public NutritionFacts builder() {
            return new NutritionFacts(this);
        }
    }

    private NutritionFacts(Builder builder) {
        name = builder.name;
    }
}
